package com.era.act.news;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.era.dao.NewsInfoDAO;
import com.era.entity.NewsInfo;
import com.era.srv.NewsService;

public class NewsListAction extends ActionSupport{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private NewsService newsSer;
	private List newsList;
	private int newsId;
	private String title;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}

	private NewsInfo newsInfo = new NewsInfo();
	public NewsInfo getNewsInfo() {
		return newsInfo;
	}
	public void setNewsInfo(NewsInfo newsInfo) {
		this.newsInfo = newsInfo;
	}
	public int getNewsId() {
		return newsId;
	}
	public void setNewsId(int newsId) {
		this.newsId = newsId;
	}
	public List getNewsList() {
		return newsList;
	}
	public NewsService getNewsSer() {
		return newsSer;
	}
	public void setNewsSer(NewsService newsSer) {
		this.newsSer = newsSer;
	}
	public void setNewsList(List newsList) {
		this.newsList = newsList;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		newsList = newsSer.findByTitle(title);
		return SUCCESS;
	}



}
